home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-08 | 2.0 KB | 88 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWMemTas.h
- // Release Version: $ 1.0d11 $
- //
- // Copyright: (c) 1993, 1995 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWMEMTAS_H
- #define FWMEMTAS_H
-
- #ifndef FWMEMMGR_H
- #include "FWMemMgr.h"
- #endif
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export on
- #endif
-
- //========================================================================================
- // Forward class declarations
- //========================================================================================
-
- struct MemHeap;
-
- //========================================================================================
- // Struct FW_SPrivMemoryGlobals
- //========================================================================================
-
- #ifdef FW_BUILD_MAC
- #pragma options align=mac68k
- #endif
-
- #ifdef FW_BUILD_WIN
- #pragma pack(push, 1)
- #endif
-
- struct FW_SPrivMemoryGlobals
- {
- MemHeap* gMemoryHeap; // The heap
- FW_PFVV gNewHandler; // The new handler
- unsigned long gLastRequested; // The last requested block size
- short gInitialized;
- };
-
- #ifdef FW_BUILD_MAC
- #pragma options align=reset
- #endif
-
- #ifdef FW_BUILD_WIN
- #pragma pack(pop)
- #endif
-
- //========================================================================================
- // CLASS FW_CMemoryTaskGlobals
- //========================================================================================
-
- class FW_CLASS_ATTR FW_CMemoryTaskGlobals
- {
- public:
- static FW_SPrivMemoryGlobals& GetMemoryGlobals();
-
- static void SetMemoryHeap(MemHeap* aMemoryHeap);
-
- static void Initialize(FW_SPrivMemoryGlobals& memGlobals);
- static void Terminate();
-
- static void InitializeMemoryHeap(FW_SPrivMemoryGlobals& memGlobals);
- static void TerminateMemoryHeap();
-
- private:
-
- enum {kMemoryGlobalsOffset = 126};
-
- FW_CMemoryTaskGlobals();
-
- private:
- static FW_SPrivMemoryGlobals gGlobals;
- };
-
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export off
- #endif
-
- #endif
-